#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<double> a, b;
double n, p;
bool func(double x) {
    double temp = p * x;
    for(int i = 0; i < n; i++) {
        if(a[i] * x <= b[i]) {
            continue;
        }else{
            if(a[i] * x  - b[i] <= temp) {
                temp -= (a[i] * x - b[i]);
                continue;
            }else {
                return false;
            }
        }
    }
    return true;
}
int main() {
    cin >> n >> p;
    double ans = 0;
    for(int i = 0; i < n; i++) {
        double x, y;
        cin >> x >> y;
        a.push_back(x);
        ans += x;
        b.push_back(y);
    }
    if(ans <= p) {
        cout << -1 << endl;
        return 0;
    }
    vector<double> c = a;
    sort(c.begin(), c.end());
    vector<double> d = b;
    sort(d.begin(), d.end());
    double r = 1e18;
    double l = 0;
    while(r - l > 0.00001) {
        double mid = l + (r - l) / 2.0;
        if(func(mid)) {
            l = mid;
        }else {
            r = mid;
        }
    }
    cout << (l + r) / 2.0 << endl;
    return 0;
}